﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Data;
using System.ComponentModel;


namespace FinalProject.Entities
{
    public class Ticket
    {
        public int Id { get; set; }
        [DisplayName("Ticket Number")]
        [Required]
        [StringLength(16)]
        public string Name { get; set; }

        [Required]
        [DataType(DataType.Currency)]
        [DisplayFormat(DataFormatString = "{0:C}")]
        public double TicketBalance { get; set; }

        public int ClientId { get; set; }
        public virtual Client Client { get; set; }

        public virtual ICollection<TicketItem> TicketItems { get; set; }
        public Ticket()
        {
            TicketItems = new List<TicketItem>();
        }
    }
}